#include "beep.h"
#include "main.h"

twinkleType Beep;
void buzzon(void){	HAL_GPIO_WritePin(BEEP_GPIO_Port, BEEP_Pin,GPIO_PIN_SET);}
void buzzoff(void){	HAL_GPIO_WritePin(BEEP_GPIO_Port, BEEP_Pin,GPIO_PIN_RESET);}

void beep_write(uint8_t mode)//mode是鸣叫几次
{
	twinkle_set(&Beep,1,mode,50,100,buzzon,buzzoff);
}




beepFunsType    beep=
{
    .write = beep_write,
};
